using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace MicroMsg.Storage
{
	[Table]
	public class Contact : StorageItem
	{
		public const int Field_strUsrName = 1;
		public const int Field_strNickName = 4;
		public const int Field_Uin = 8;
		public const int Field_strEmail = 16;
		public const int Field_strMobile = 32;
		public const int Field_nSex = 64;
		public const int Field_strPYInitial = 128;
		public const int Field_strQuanPin = 256;
		public const int Field_strHeadImg = 512;
		public const int Field_nFlags = 1024;
		public const int Field_strRemark = 2048;
		public const int Field_strRemarkPYInitial = 4096;
		public const int Field_strRemarkQuanPin = 8192;
		public const int Field_nImgFlag = 16384;
		public const int Field_nContactType = 32768;
		public const int Field_nRoomInfoCount = 65536;
		public const int Field_strDomainList = 131072;
		public const int Field_nChatRoomNotify = 262144;
		public const int Field_nAddContactScene = 524288;
		public const int Field_nExtInfoSeq = 1048576;
		public const int Field_nImgUpdateSeq = 2097152;
		public const int Field_strExtInfo = 4194304;
		public const int Field_strProvince = 8388608;
		public const int Field_strCity = 16777216;
		public const int Field_strSignature = 33554432;
		public const int Field_nPersonalCard = 67108864;
		public const int Field_nHasWeiXinHdHeadImg = 134217728;
		public const int Field_nVerifyFlag = 268435456;
		public const int Field_strVerifyInfo = 536870912;
		public const int Field_bytesXmlBuf = 1073741824;
		public const long Field_strAlias = -2147483648L;
		public const long Field_nSource = 1L;
		private string _strUsrName;
		private string _strNickName;
		private uint _Uin;
		private string _strEmail;
		private string _strMobile;
		private int _nSex;
		private string _strPYInitial;
		private string _strQuanPin;
		private string _strHeadImg;
		private uint _nFlags;
		private string _strRemark;
		private string _strRemarkPYInitial;
		private string _strRemarkQuanPin;
		private uint _nImgFlag;
		private uint _nContactType;
		private int _nRoomInfoCount;
		private string _strDomainList;
		private uint _nChatRoomNotify;
		private uint _nAddContactScene;
		private int _nExtInfoSeq;
		private int _nImgUpdateSeq;
		private string _strExtInfo;
		private string _strProvince;
		private string _strCity;
		private string _strSignature;
		private uint _nPersonalCard;
		private uint _nHasWeiXinHdHeadImg;
		private uint _nVerifyFlag;
		private string _strVerifyInfo;
		private string _strAlias;
		private uint? _nSource;
		private byte[] _bytesXmlBuf;
		[Column(IsVersion = true)]
		private Binary _version;
		private ContactXmlData _xmlData;
		private ContactXmlDataSerial serial;
		[Column(IsPrimaryKey = true)]
		public string strUsrName
		{
			get
			{
				return this._strUsrName;
			}
			set
			{
				this._strUsrName = value;
				this.modify |= 1L;
			}
		}
		[Column]
		public string strNickName
		{
			get
			{
				return this._strNickName;
			}
			set
			{
				this._strNickName = value;
				this.modify |= 4L;
			}
		}
		[Column]
		public uint Uin
		{
			get
			{
				return this._Uin;
			}
			set
			{
				this._Uin = value;
				this.modify |= 8L;
			}
		}
		[Column]
		public string strEmail
		{
			get
			{
				return this._strEmail;
			}
			set
			{
				this._strEmail = value;
				this.modify |= 16L;
			}
		}
		[Column]
		public string strMobile
		{
			get
			{
				return this._strMobile;
			}
			set
			{
				this._strMobile = value;
				this.modify |= 32L;
			}
		}
		[Column]
		public int nSex
		{
			get
			{
				return this._nSex;
			}
			set
			{
				this._nSex = value;
				this.modify |= 64L;
			}
		}
		[Column]
		public string strPYInitial
		{
			get
			{
				return this._strPYInitial;
			}
			set
			{
				this._strPYInitial = value;
				this.modify |= 128L;
			}
		}
		[Column]
		public string strQuanPin
		{
			get
			{
				return this._strQuanPin;
			}
			set
			{
				this._strQuanPin = value;
				this.modify |= 256L;
			}
		}
		[Column]
		public string strHeadImg
		{
			get
			{
				return this._strHeadImg;
			}
			set
			{
				this._strHeadImg = value;
				this.modify |= 512L;
			}
		}
		[Column]
		public uint nFlags
		{
			get
			{
				return this._nFlags;
			}
			set
			{
				this._nFlags = value;
				this.modify |= 1024L;
			}
		}
		[Column]
		public string strRemark
		{
			get
			{
				return this._strRemark;
			}
			set
			{
				this._strRemark = value;
				this.modify |= 2048L;
			}
		}
		[Column]
		public string strRemarkPYInitial
		{
			get
			{
				return this._strRemarkPYInitial;
			}
			set
			{
				this._strRemarkPYInitial = value;
				this.modify |= 4096L;
			}
		}
		[Column]
		public string strRemarkQuanPin
		{
			get
			{
				return this._strRemarkQuanPin;
			}
			set
			{
				this._strRemarkQuanPin = value;
				this.modify |= 8192L;
			}
		}
		[Column]
		public uint nImgFlag
		{
			get
			{
				return this._nImgFlag;
			}
			set
			{
				this._nImgFlag = value;
				this.modify |= 16384L;
			}
		}
		[Column]
		public uint nContactType
		{
			get
			{
				return this._nContactType;
			}
			set
			{
				this._nContactType = value;
				this.modify |= 32768L;
			}
		}
		[Column]
		public int nRoomInfoCount
		{
			get
			{
				return this._nRoomInfoCount;
			}
			set
			{
				this._nRoomInfoCount = value;
				this.modify |= 65536L;
			}
		}
		[Column]
		public string strDomainList
		{
			get
			{
				return this._strDomainList;
			}
			set
			{
				this._strDomainList = value;
				this.modify |= 131072L;
			}
		}
		[Column]
		public uint nChatRoomNotify
		{
			get
			{
				return this._nChatRoomNotify;
			}
			set
			{
				this._nChatRoomNotify = value;
				this.modify |= 262144L;
			}
		}
		[Column]
		public uint nAddContactScene
		{
			get
			{
				return this._nAddContactScene;
			}
			set
			{
				this._nAddContactScene = value;
				this.modify |= 524288L;
			}
		}
		[Column]
		public int nExtInfoSeq
		{
			get
			{
				return this._nExtInfoSeq;
			}
			set
			{
				this._nExtInfoSeq = value;
				this.modify |= 1048576L;
			}
		}
		[Column]
		public int nImgUpdateSeq
		{
			get
			{
				return this._nImgUpdateSeq;
			}
			set
			{
				this._nImgUpdateSeq = value;
				this.modify |= 2097152L;
			}
		}
		[Column]
		public string strExtInfo
		{
			get
			{
				return this._strExtInfo;
			}
			set
			{
				this._strExtInfo = value;
				this.modify |= 4194304L;
			}
		}
		[Column]
		public string strProvince
		{
			get
			{
				return this._strProvince;
			}
			set
			{
				this._strProvince = value;
				this.modify |= 8388608L;
			}
		}
		[Column]
		public string strCity
		{
			get
			{
				return this._strCity;
			}
			set
			{
				this._strCity = value;
				this.modify |= 16777216L;
			}
		}
		[Column]
		public string strSignature
		{
			get
			{
				return this._strSignature;
			}
			set
			{
				this._strSignature = value;
				this.modify |= 33554432L;
			}
		}
		[Column]
		public uint nPersonalCard
		{
			get
			{
				return this._nPersonalCard;
			}
			set
			{
				this._nPersonalCard = value;
				this.modify |= 67108864L;
			}
		}
		[Column]
		public uint nHasWeiXinHdHeadImg
		{
			get
			{
				return this._nHasWeiXinHdHeadImg;
			}
			set
			{
				this._nHasWeiXinHdHeadImg = value;
				this.modify |= 134217728L;
			}
		}
		[Column]
		public uint nVerifyFlag
		{
			get
			{
				return this._nVerifyFlag;
			}
			set
			{
				this._nVerifyFlag = value;
				this.modify |= 268435456L;
			}
		}
		[Column]
		public string strVerifyInfo
		{
			get
			{
				return this._strVerifyInfo;
			}
			set
			{
				this._strVerifyInfo = value;
				this.modify |= 536870912L;
			}
		}
		[Column(CanBeNull = true)]
		public string strAlias
		{
			get
			{
				return this._strAlias;
			}
			set
			{
				this._strAlias = value;
				this.modify |= -2147483648L;
			}
		}
		[Column(CanBeNull = true)]
		public uint? nSource
		{
			get
			{
				return this._nSource;
			}
			set
			{
				this._nSource = value;
				this.modify |= 1L;
			}
		}
		[Column(DbType = "Image")]
		public byte[] bytesXmlBuf
		{
			get
			{
				return this._bytesXmlBuf;
			}
			set
			{
				this._bytesXmlBuf = value;
				this.modify |= 1073741824L;
			}
		}
		public int nInputType
		{
			get
			{
				this.load();
				return this._xmlData.nInputType;
			}
			set
			{
				this.load();
				this._xmlData.nInputType = value;
				this.unload();
			}
		}
		public string strInputText
		{
			get
			{
				this.load();
				return this._xmlData.strInputText;
			}
			set
			{
				this.load();
				this._xmlData.strInputText = value;
				this.unload();
			}
		}
		public uint nQQ
		{
			get
			{
				this.load();
				return this._xmlData.nQQ;
			}
			set
			{
				this.load();
				this._xmlData.nQQ = value;
				this.unload();
			}
		}
		public uint nSnsFlag
		{
			get
			{
				this.load();
				return this._xmlData.nSnsFlag;
			}
			set
			{
				this.load();
				this._xmlData.nSnsFlag = value;
				this.unload();
			}
		}
		public string strSnsBGImgID
		{
			get
			{
				this.load();
				return this._xmlData.strSnsBGImgID;
			}
			set
			{
				this.load();
				this._xmlData.strSnsBGImgID = value;
				this.unload();
			}
		}
		public ulong nSnsBGObjectID
		{
			get
			{
				this.load();
				return this._xmlData.nSnsBGObjectID;
			}
			set
			{
				this.load();
				this._xmlData.nSnsBGObjectID = value;
				this.unload();
			}
		}
		public string strChatRoomOwner
		{
			get
			{
				this.load();
				return this._xmlData.strChatRoomOwner;
			}
			set
			{
				this.load();
				this._xmlData.strChatRoomOwner = value;
				this.unload();
			}
		}
		public string strWeibo
		{
			get
			{
				this.load();
				return this._xmlData.strWeibo;
			}
			set
			{
				this.load();
				this._xmlData.strWeibo = value;
				this.unload();
			}
		}
		public string strWeiboNickname
		{
			get
			{
				this.load();
				return this._xmlData.strWeiboNickname;
			}
			set
			{
				this.load();
				this._xmlData.strWeiboNickname = value;
				this.unload();
			}
		}
		public uint nWeiboFlag
		{
			get
			{
				this.load();
				return this._xmlData.nWeiboFlag;
			}
			set
			{
				this.load();
				this._xmlData.nWeiboFlag = value;
				this.unload();
			}
		}
		public string strMyBrandList
		{
			get
			{
				this.load();
				return this._xmlData.strMyBrandList;
			}
			set
			{
				this.load();
				this._xmlData.strMyBrandList = value;
				this.unload();
			}
		}
		public uint nBrandFlag
		{
			get
			{
				this.load();
				return this._xmlData.nBrandFlag;
			}
			set
			{
				this.load();
				this._xmlData.nBrandFlag = value;
				this.unload();
			}
		}
		public string strBrandExternalInfo
		{
			get
			{
				this.load();
				return this._xmlData.strBrandExternalInfo;
			}
			set
			{
				this.load();
				this._xmlData.strBrandExternalInfo = value;
				this.unload();
			}
		}
		public string strBrandInfo
		{
			get
			{
				this.load();
				return this._xmlData.strBrandInfo;
			}
			set
			{
				this.load();
				this._xmlData.strBrandInfo = value;
				this.unload();
			}
		}
		public string strBrandIconURL
		{
			get
			{
				this.load();
				return this._xmlData.strBrandIconURL;
			}
			set
			{
				this.load();
				this._xmlData.strBrandIconURL = value;
				this.unload();
			}
		}
		public int nUpdateDay
		{
			get
			{
				this.load();
				return this._xmlData.nUpdateDay;
			}
			set
			{
				this.load();
				this._xmlData.nUpdateDay = value;
				this.unload();
			}
		}
		public int nTooMuchMsgNotifyNumber
		{
			get
			{
				this.load();
				return this._xmlData.nTooMuchMsgNotifyNumber;
			}
			set
			{
				this.load();
				this._xmlData.nTooMuchMsgNotifyNumber = value;
				this.unload();
			}
		}
		public override void merge(object object_0)
		{
			Contact contact = object_0 as Contact;
			if (0L != (contact.modify & 1L))
			{
				this._strUsrName = contact._strUsrName;
			}
			if (0L != (contact.modify & 4L))
			{
				this._strNickName = contact._strNickName;
			}
			if (0L != (contact.modify & 8L))
			{
				this._Uin = contact._Uin;
			}
			if (0L != (contact.modify & 16L))
			{
				this._strEmail = contact._strEmail;
			}
			if (0L != (contact.modify & 32L))
			{
				this._strMobile = contact._strMobile;
			}
			if (0L != (contact.modify & 64L))
			{
				this._nSex = contact._nSex;
			}
			if (0L != (contact.modify & 128L))
			{
				this._strPYInitial = contact._strPYInitial;
			}
			if (0L != (contact.modify & 256L))
			{
				this._strQuanPin = contact._strQuanPin;
			}
			if (0L != (contact.modify & 512L))
			{
				this._strHeadImg = contact._strHeadImg;
			}
			if (0L != (contact.modify & 1024L))
			{
				this._nFlags = contact._nFlags;
			}
			if (0L != (contact.modify & 33554432L))
			{
				this._strSignature = contact._strSignature;
			}
			if (0L != (contact.modify & 2048L))
			{
				this._strRemark = contact._strRemark;
			}
			if (0L != (contact.modify & 4096L))
			{
				this._strRemarkPYInitial = contact._strRemarkPYInitial;
			}
			if (0L != (contact.modify & 8192L))
			{
				this._strRemarkQuanPin = contact._strRemarkQuanPin;
			}
			if (0L != (contact.modify & 16384L))
			{
				this._nImgFlag = contact._nImgFlag;
			}
			if (0L != (contact.modify & 32768L))
			{
				this._nContactType = contact._nContactType;
			}
			if (0L != (contact.modify & 65536L))
			{
				this._nRoomInfoCount = contact._nRoomInfoCount;
			}
			if (0L != (contact.modify & 131072L))
			{
				this._strDomainList = contact._strDomainList;
			}
			if (0L != (contact.modify & 262144L))
			{
				this._nChatRoomNotify = contact._nChatRoomNotify;
			}
			if (0L != (contact.modify & 524288L))
			{
				this._nAddContactScene = contact._nAddContactScene;
			}
			if (0L != (contact.modify & 1048576L))
			{
				this._nExtInfoSeq = contact._nExtInfoSeq;
			}
			if (0L != (contact.modify & 2097152L))
			{
				this._nImgUpdateSeq = contact._nImgUpdateSeq;
			}
			if (0L != (contact.modify & 4194304L))
			{
				this._strExtInfo = contact._strExtInfo;
			}
			if (0L != (contact.modify & 8388608L))
			{
				this._strProvince = contact.strProvince;
			}
			if (0L != (contact.modify & 16777216L))
			{
				this._strCity = contact.strCity;
			}
			if (0L != (contact.modify & 33554432L))
			{
				this._strSignature = contact.strSignature;
			}
			if (0L != (contact.modify & 67108864L))
			{
				this._nPersonalCard = contact.nPersonalCard;
			}
			if (0L != (contact.modify & 134217728L))
			{
				this._nHasWeiXinHdHeadImg = contact.nHasWeiXinHdHeadImg;
			}
			if (0L != (contact.modify & 268435456L))
			{
				this._nVerifyFlag = contact.nVerifyFlag;
			}
			if (0L != (contact.modify & 536870912L))
			{
				this._strVerifyInfo = contact.strVerifyInfo;
			}
			if (0L != (contact.modify & -2147483648L))
			{
				this._strAlias = contact.strAlias;
			}
			if (0L != (contact.modify & 1L))
			{
				this._nSource = contact._nSource;
			}
			if (0L != (contact.modify & 1073741824L))
			{
				this._bytesXmlBuf = contact._bytesXmlBuf;
				this._xmlData = null;
				this.serial = null;
			}
		}
		private void load()
		{
			if (this._xmlData != null)
			{
				return;
			}
			this.serial = StorageXml.loadFromBuffer<ContactXmlDataSerial>(this.bytesXmlBuf);
			if (this.serial == null)
			{
				this.serial = new ContactXmlDataSerial();
				this.serial.data = new ContactXmlData();
			}
			this._xmlData = this.serial.data;
		}
		private void unload()
		{
			if (this.serial != null)
			{
				this.bytesXmlBuf = StorageXml.saveToBuffer<ContactXmlDataSerial>(this.serial);
			}
		}
	}
}
